<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>




   var res = prompt(`是否下雨`);
   var res1 = res==`下雨`?`带伞`:`不带伞`;
   alert(res1);
   

    </script>
</body>
</html>